<template>
  <div id="app">
    <bofang-1 :movie="movieinfo"></bofang-1>
    <!-- <Bofang1></Bofang1> -->
    <!-- <Bofang2></Bofang2> -->
    <bofang-2 :comments="comments"></bofang-2>
    <Jingdian titl="name"></Jingdian>
		<!-- <Footer></Footer> -->

  </div>
</template>

<script>
import axios from "axios";
import Bofang1 from "./components/Bofang1.vue";
import Bofang2 from "./components/Bofang2.vue";
import Jingdian from "./components/Jingdian.vue";
// import Footer from "@/views/Home/components/Footer.vue";

export default {
  name: "Bf",
  components: {
    Bofang1,
    Bofang2,
    Jingdian,
    // Footer
  },
  data() {
    return {
      movieinfo: {},
      comments: [],
    };
  },created(){
        // console.log("this.$router",this.$router);
        // console.log("this.$route",this.$route);
        
        // console.log("this.$route.params.movieid",this.$route.params.movieid);
        
        axios.all([
            axios.get("/Video/"+this.$route.params.movieid),
            console.log("/Video/"+this.$route.params.movieid),
            axios.get("/comments?movieid="+this.$route.params.movieid)
        ])
        .then(
            axios.spread((movieRes,commentsRes)=>{
                console.log("then");
                this.movieinfo = movieRes.data[0];
                this.comments = commentsRes.data;
            })
        )
  }
};
</script>

<style scoped>
</style>
